package com.lwj.service;

import com.github.pagehelper.PageInfo;
import com.lwj.entity.Merchant;
import com.lwj.entity.Project;
import com.lwj.entity.User;
import com.lwj.model.TypeTree;
import com.lwj.model.UserProjectRes;
import com.lwj.util.DataRet;

import javax.xml.crypto.Data;
import java.util.List;

/**
 * Created by LWJ on 2018/4/26.
 */
public interface ProjectService {

    /**
     * 项目创建
     * @param project
     * @return
     */
    DataRet<String> create(Merchant merchant,Project project);

    /**
     * 获取商家所创建的项目
     * @param merchant
     * @param pageNo
     * @param pageSize
     * @return
     */
    PageInfo<Project> getProject(Merchant merchant, int pageNo, int pageSize);

    /**
     * 获取类型树
     * @return
     */
    DataRet<List<TypeTree>> getTypeTree();

    /**
     * 根据类型获取项目信息
     * @param pageNo
     * @param pageSize
     * @param typeId
     * @return
     */
    PageInfo<Project> getProjectByType(int pageNo,int pageSize,int typeId);

    /**
     * 获取用户项目
     * @param user
     * @param pageNo
     * @param pageSize
     * @return
     */
    PageInfo<UserProjectRes> getUserProject(User user, int pageNo, int pageSize);

    PageInfo<UserProjectRes> getAllProject(int pageNo, int pageSize);

    /**
     * 企业验收完毕
     * @param projectId
     * @return
     */
    DataRet<String> merchantDeal(int projectId);

    /**
     * 用户验收完毕
     * @param projectId
     * @return
     */
    DataRet<String> userDeal(int projectId);

    /**
     * 获取项目详情
     * @param projectId
     * @return
     */
    DataRet<Project> getProjectDetail(int projectId);
}
